{% load i18n %}

{% spaceless %}

{% if is_paginated %}
<div class="paginator">
{% if has_previous %}
<span class="prev">
<a href="{{base_url}}/page/{{ previous }}/" title='{% trans "Previous Page" %}'>
{% trans "Previous" %}
</a></span>
{% else %}
<span class="prev-na">{% trans "Previous" %}</span>
{% endif %}
 
{% if not in_leading_range %}
	{% for num in pages_outside_trailing_range %}
		<span class="page"><a href="{{base_url}}/page/{{ num }}/" >{{ num }}</a></span>
	{% endfor %}
	...
{% endif %}
 
{% for num in page_numbers %}
  {% if num == page %}
    <span class="curr" title="{% trans 'Current Page' %}">{{ num }}</span>
  {% else %}
  	<span class="page"><a href="{{base_url}}/page/{{ num }}/" title='{% trans "Page" %} {{ num }}'>{{ num }}</a></span>
  {% endif %}
{% endfor %}
 
{% if not in_trailing_range %}
	...
	{% for num in pages_outside_leading_range reversed %}
		<span class="page"><a href="{{base_url}}/page/{{ num }}/" >{{ num }}</a></span>
	{% endfor %}
{% endif %}
 
{% if has_next %}
<span class="next">
<a href="{{base_url}}/page/{{ next }}/" title="{% trans 'Next Page' %}">
{% trans "Next" %}</a></span>
{% else %}
<span class="next-na">{% trans "Next" %}</span>
{% endif %}

</div> 
{% endif %}
 
{% endspaceless %}
